<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMetrosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('metros', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('province_id')->unsigned()->comment('所属省');
            $table->string('province_name')->comment('省');
            $table->integer('region_id')->unsigned()->comment('所属市');
            $table->string('region')->comment('市');
            $table->string('name')->comment('线路名');
            $table->integer('sort')->default(0)->nullable()->comment('排序');
            $table->string('status')->default('T')->comment('状态：T 启用 F 禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('metros');
    }
}
